num = int(input())
hundred = num // 100
ten = (num // 10) % 10
unit = num % 10
new_num = unit * 100 + ten * 10 + hundred
print(new_num)